package lib.bone.system.extend.domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;
/**
 * 修改
 */

/**
 * @Author : kindear
 * @Date : 2021-12-29
 * @Desc : 词典数据维护
 */
@Data
@Entity
@Table(name = "sys_dict_data")
@ApiModel(value = "系统词典数据",description = "系统词典数据维护")
@EntityListeners(AuditingEntityListener.class)
public class SysDictData {
    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    @ApiModelProperty(value = "词典数据ID",name = "id")
    Long id;

    @ApiModelProperty("词典数据排序")
    @Column(name = "dict_sort")
    Integer dictSort;

    @ApiModelProperty("词典数据标签")
    @Column(name = "dict_label")
    String dictLabel;

    @ApiModelProperty("词典数据键值")
    @Column(name = "dict_value")
    String dictValue;

    @ApiModelProperty("词典数据类型")
    @Column(name = "dict_type")
    String dictType;

    /**
     * 表格回显样式
     */
    @ApiModelProperty(value = "表格显示样式",notes = "对应不同按钮类型")
    @Column(name = "list_class")
    String listClass;

    /**
     * 是否默认
     */
    @ApiModelProperty("是否默认")
    @Column(name = "is_default")
    Integer isDefalut;

    /**
     * 使用状态
     */
    @ApiModelProperty(value = "词典数据状态",notes = "1是正常0是未启用")
    @Column(name = "status")
    Integer status;

    @CreatedDate
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "记录创建时间",name = "createdTime")
    @Column(name = "created_time")
    private Date createdTime;
    @LastModifiedDate
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "记录更新时间",name = "updatedTime")
    @Column(name = "updated_time")
    private Date updatedTime;
}
